<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>RTMS by EinsCompany</title>
    <style type="text/css">
	@import "css/ui.jqgrid.css";
	@import "css/layout.css";
	@import "css/styles.css";  
	@import "css/redmond/jquery-ui-1.10.4.custom.min.css";
	</style>        
	<script src="js/jquery-1.10.2.js" type="text/javascript" language="javascript"> </script>
    <script src="js/jquery.validate.min.js" type="text/javascript" language="javascript"> </script>		
	<script src="js/additional-methods.min.js" type="text/javascript" language="javascript"> </script>	
	<script src="js/jquery-ui-1.10.4.custom.min.js" type="text/javascript" language="javascript"> </script>	
	<script src="js/libs.js" type="text/javascript" language="javascript"> </script>
	<script src="js/i18n/grid.locale-en.js" type="text/javascript" language="javascript"> </script>
	<script src="js/jquery.jqGrid.min.js" type="text/javascript" language="javascript"> </script>	
	<script>
	$(document).ready(function(){		

	jQuery("#list47").jqGrid({
	url:'getdata.php?opt=finDashboardExpenses',
	datatype: "json",
	height: 'auto',
	rowNum: 30,
	rowList: [10,20,30],
   	colNames:['Enterprise','Category', 'Child','amount_GTQ'],
   	colModel:[
   		{name:'enterpriseName', width:60},
   		{name:'MidCategory', width:90},
   		{name:'BaseCategory',  width:250},   		   		
   		{name:'amount_GTQ', width:150, align:"center",formatter:'number',summaryType:'sum'}		
   	],
   	pager: "#plist47",
   	viewrecords: true,   	
   	grouping: true,
   	groupingView : {
   		groupField : ['enterpriseName','MidCategory'],
   		groupColumnShow : [false,false],   		
   		groupCollapse : false,
		groupOrder: ['asc'],
		groupSummary : [true,true],
		showSummaryOnHide: true		
   	},
   	caption: "Expenses per Enterprise per Year"
	});
/*
	jQuery("#list47").jqGrid('jqPivot', 
	"data.json",
	// pivot options
	{
		xDimension : [{dataName: 'trnYear'},{dataName:'enterpriseName'},{dataName:'MidCategory'},{dataName:'BaseCategory'}],
		yDimension : [{dataName:'trnMonth'}],
		aggregates : [
			{ 
				member : 'amount_GTQ', 
				aggregator : 'sum', 
				width:80, 
				label:'Sum Price', 
				formatter:'number', 
				align:'center',
				summaryType: 'sum'
			}
		]
	}, 
	// grid options
	{
		width: 1024,
		rowNum : 200,
		pager: "#plist47",
		caption: "Amounts of each product category"
	});*/
});
	</script>
	</head>
<body>
	<table id="list47"></table>
	<div id="plist47"></div>
</body>
</body>